/** 
Copyright (c) 2010, Sheikh Abdul Wahid Ahmed
Details @ http://extremecodeworld.codeplex.com/license
**/

using System;

namespace EXtremecode.Common.Security
{
	/// <summary>
	/// Summary description for IRole.
	/// </summary>
	public interface IRole
	{
		bool IsUserAuthorizedForModule(string key);
		string RoleName
		{
			get;
		}
		string RoleId
		{
			get;
		}

		string HomeModule
		{
			get;
		}

	}

    public class DummyRole : IRole
    {

        #region IRole Members

        public bool IsUserAuthorizedForModule(string key)
        {
            return true;
        }

        public string RoleName
        {
            get { return string.Empty; }
        }

        public string RoleId
        {
            get { return "DummyRole"; }
        }

        public string HomeModule
        {
            get { return string.Empty; }
        }

        #endregion
    }
}
